<%@ page contentType="text/html;charset=UTF-8" %>
<script id="navTemplate" type="text/x-jsrender">
	<li><a href="#tab{{>solutionId}}">
			<input data-inline="true" type="checkbox" id="{{>solutionId}}" value="{{>solutionName}}">
    		<label for="{{>solutionId}}">&nbsp;</label><font>{{>solutionName}}</font>
	</a></li>
</script>
<script id="contentTemplate" type="text/x-jsrender">
	{{if index==0}}
		<div id="tab{{>solutionId}}">
	{{else}}
		<div id="tab{{>solutionId}}">
	{{/if}}
<table class="solutionTable">
<tr class="productShow-{{>solutionId}}">
	<th class="showProduct" status="{{>solutionId}}">
		<div data-role="collapsible">
    			<h4>家居保养步骤（共{{>stepLength}}步）</h4>
<table border="1" class="solutionTable">
	{{for stepList}}
		<tr>
			<th style="width:8%">{{>stepText}}</th>
			<td><table class="product-table">
			<tr><th class="stepTitle line-td">日间</th><th class="stepTitle">夜间</th></tr>
			{{for mixList}}<tr>
						{{for mixList}}<td>
							{{if mixId==-1}}
								&nbsp;
							{{else}}
							<div class="product">
							<div class="title">
 								<input type="checkbox" name="{{>mixId}}" id="mix-{{>mixId}}">
								<label for="mix-{{>mixId}}">{{if mixNeeded==1}}(*){{/if}}{{>mixName}}</label>
								{{for detailList}}
									<div class="item" id="product-{{>productId}}" value="{{>productId}}" type="product">
										<div class="left">
											<p><a value="product-{{>productId}}">{{if productNeeded==1}}(*){{/if}}{{>productName}}</a></p>
											<p>数量:{{>productAmount}}</p>
											<P>混合比例：{{if productMixRatio=="-1"}}不参与混合配比{{/if}}	
												{{if productMixRatio!="-1"}}{{>productMixRatio}}{{/if}}
											</P>
										</div>
										<div class="right">{{if productImage!="#"}}
											<div class="noimg"><img src="{{>productImage}}" alt="产品图片" /></div>
										{{/if}}	
										{{if productImage=="#"}}
											<div class="noimg">无图片</div>
										{{/if}}	
										</div>	
									</div>
								{{/for}}
								</div>
							{{/if}}
						</td>{{/for}}
			<tr>{{/for}}
			</table></td>
		</tr>
	{{/for}}
</table>
		</div>
	</th></tr>
	<tr><th class="food">
		<div data-role="collapsible">
    			<h4>健康食品</h4>
    			<p>{{for foodList}}
					<div class="item">
						<div class="top">
							<input data-inline="true" type="checkbox" id="product-{{>solutionId}}-{{>productId}}" value="{{>productName}}" />
 							<label for="product-{{>solutionId}}-{{>productId}}">{{>productName}}(数量:{{>productAmount}})</label>
						</div>
						<div class="bottom" value="{{>productId}}" type="product">{{if productImage!="#"}}
							<div class="noimg"><img src="{{>productImage}}" alt="产品图片" /></div>
							{{/if}}	
							{{if productImage=="#"}}
							<div class="noimg"><img src="{{:#parent.parent.parent.parent.data.noimgUrl}}" alt="无图片" /></div>
							{{/if}}	
						</div>						
					</div>
				{{/for}}
				</p>
		</div>
	</th></tr>
	<tr><th class="care">
		<div data-role="collapsible">
    			<h4>护理项目</h4>
    			<p>{{for careList}}
					<div class="item">
						<input data-inline="true" type="checkbox" id="care-{{>careId}}" value="{{>careName}}" />
 						<label for="care-{{>careId}}">&nbsp;</label>
						<button data-inline="true" id="care-{{>careId}}" value="{{>careId}}"  type="care">{{if careNeeded==1}}(*){{/if}}{{>careName}}</button>
					</div>
				{{/for}}
				</p>
		</div>
	</th></tr>
	<tr class="solutionUsage"><th>这是为您解决了{{>solutionUsage}}问题</th></tr>
</table>
</div>
</script>
<script id="sureTemplate" type="text/x-jsrender">
{{for solutionList}}
{{if checked==true}}
<table border="1">
	<tbody>
	<tr><th colspan="4" class="title">{{>solutionName}}</th></tr>
	<tr><th width="150">类别</th><th>名称</th><th width="100">数量</th><th width="100">零售价</th></tr>
	{{for productList}}
		<tr>
			{{if #index==0}}
				<td rowspan="{{:#parent.parent.parent.data.productLength}}">选择的产品</td>
			{{/if}}
			<td>{{>productName}}</td>
			<td>{{>productAmount}}</td>
			<td>{{>productPrice}}元</td>
		</tr>
	{{/for}}
	{{for foodList}}
		<tr>
			{{if #index==0}}
				<td rowspan="{{:#parent.parent.parent.data.foodLength}}">健康食品</td>
			{{/if}}
			<td>{{>productName}}</td>
			<td>{{>productAmount}}</td>
			<td>{{>productPrice}}元</td>
		</tr>
	{{/for}}
	{{for careList}}
		<tr>
			{{if #index==0}}
				<td rowspan={{:#parent.parent.parent.parent.data.careLength}}>选择的护理</td>
			{{/if}}
			<td>{{>careName}}</td>
			<td>1</td>
			<td>{{>carePrice}}元</td>
		</tr>
	{{/for}}
	<tr><td>合计零售价</td><td colspan="3">{{>totalMoney}}元</td></tr>
	</tbody>
</table>
{{/if}}
{{/for}}
<input type="submit" value="放入购物车"/>
</script>